<script setup lang="ts">
import crud, { defineR } from "crud-vue";
import { request } from "axios";
const primaryKey = "id";
const r = defineR({
    columns: [
        {
            title: "name",
            dataIndex: "name",
        },
        {
            title: "操作",
            key: "operation",
            width: 250,
        },
    ],
    async done() {
        const { data } = await request("/role");
        return { list: data.list, total: data.total };
    },
});
</script>
<template>
    <crud :primaryKey="primaryKey" :r="r"></crud>
</template>
